import { Routes, Route } from "react-router-dom";
import asyncComponent from "./asyncComponent";

const Calculator = asyncComponent(() => import("./Views/Calculator"));
const Excel = asyncComponent(() => import("./Views/Excel"));
const Jiandaoyun = asyncComponent(() => import("./Views/Jiandaoyun"));
const CascaderDemo = asyncComponent(() => import("./Views/CascaderDemo"));
const Home = asyncComponent(() => import("./Home"));

export default function App() {
  return (
    <div className="App">
      <Routes>
        <Route exact path="/" element={<Home />} />
        <Route path="/calculator" element={<Calculator />} />
        <Route path="/excel" element={<Excel />} />
        <Route path="/jiandaoyun" element={<Jiandaoyun />} />
        <Route path="/cascader_demo" element={<CascaderDemo />} />
      </Routes>
    </div>
  );
}
